package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.toolbox.util.DateUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @description:
 * @Author: hongxiao
 * @date: 2019-01-12 16:50
 */
@Getter
@Setter
@ToString
public class SmsTemplateEntity extends Entity {

    private static final long serialVersionUID = -1L;

    public SmsTemplateEntity (){
        updateTime = (long)DateUtil.getInt();
        del = 0;
    }

    /**
     * 新建模板
     * @param corpid 公司id
     * @param corpName 公司名
     * @param userId 用户id
     * @param name 模板名
     * @param content 模板内容
     * @param memo 审批流记录
     */
    public SmsTemplateEntity (String corpid, String corpName, String userId, String name, String content, String memo){
        long now = DateUtil.getInt();
        this.corpid = corpid;
        this.corpName = corpName;
        this.userId = userId;
        this.name = name;
        this.content = content;
        this.applyTime = now;
        this.status = 0;
        this.memo = memo;
        this.sendApi = 2;
        this.del = 0;
        this.addTime = now;
        this.updateTime = now;
    }
    //========== properties ==========

    /**
     * 主键
      */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 公司名
      */
    private String corpName;
    /**
     * 模版内容
      */
    private String content;
    /**
     * 申请状态 0申请中,1审核中，2审核通过，3审核拒绝
     */
    private Integer status;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 模版名称(用户自定义) 参数：{简称}
     */
    private String name;
    /**
     * 申请时间
     */
    private Long applyTime;
    /**
     * 审核时间
     */
    private Long approvalTime;

    private Long addTime;

    private Long updateTime;

    private Integer del;
    /**
     * 审批流记录
     */
    private String memo;
    /**
     * 审批备注
     */
    private String approvalMemo;
    /**
     * 0创蓝营销帐号，1创蓝通知帐号， 2新营销帐号
     */
    private Integer sendApi=0;

}
